#include "cache_pool.h"

void cache_init(struct cache_pool *pool, const char *type_name) {
	list_init(pool->cache_list);
	pool->type_name = type_name;
}

void* cache_get(struct cache_pool *pool) {
	return list_get_tail(pool->cache_list->value);
}

void cache_put(struct cache_pool *pool, void *target) {
	list_add_tail(pool->cache_list, target);
}